import request from '@/utils/request'

// 查询统计表列表
export function listDeductionstat(query) {
  return request({
    url: '/doc/deductionstat/list',
    method: 'get',
    params: query
  })
}

// 查询统计表详细
export function getDeductionstat(id) {
  return request({
    url: '/doc/deductionstat/' + id,
    method: 'get'
  })
}

// 查询当前统计表详细
export function getCurrentDeductionstat() {
  return request({
    url: '/doc/deductionstat/getCurrentDeductionstat',
    method: 'get'
  })
}

// 新增统计表
export function addDeductionstat(data) {
  return request({
    url: '/doc/deductionstat',
    method: 'post',
    data: data
  })
}

// 修改统计表
export function updateDeductionstat(data) {
  return request({
    url: '/doc/deductionstat',
    method: 'put',
    data: data
  })
}

// 删除统计表
export function delDeductionstat(id) {
  return request({
    url: '/doc/deductionstat/' + id,
    method: 'delete'
  })
}

// 申请生成
export function deductionstatCreateApply(id) {
  return request({
    url: '/doc/deductionstat/createApply/' + id,
    method: 'get'
  })
}


// 申请取消
export function deductionstatCancelApply(id) {
  return request({
    url: '/doc/deductionstat/cancelApply/' + id,
    method: 'get'
  })
}

// 申请确认
export function deductionstatConfirmApply(id) {
  return request({
    url: '/doc/deductionstat/confirmApply/' + id,
    method: 'get'
  })
}


// 申请确认
export function deductionstatConfirmCancelApply(id) {
  return request({
    url: '/doc/deductionstat/confirmCancelApply/' + id,
    method: 'get'
  })
}

// 同步统计表
export function deductionstatSync(id) {
  return request({
    url: '/doc/deductionstat/sync/' + id,
    method: 'get'
  })
}

